﻿@using System.Configuration
@using MVCMongo.Services
@model DataMongo.Entities.FeedPost

@{
    ViewBag.Title = Model.Title;
    var configUrl = ConfigurationManager.AppSettings["ImageLinkUrl"] + Model.ImageURL1;
    Layout = "~/Views/Shared/_LayoutBreakingHome.cshtml";
}



<div class="container-fluid">
  
    <div class="row-fluid">
        <div class="span9">
            <div class="row-fluid">
                <div class="blog-list-post">
                    <div class="preview-img">
                        <a href="@Model.SourceLink">
                            <img src="@configUrl" alt="" />
                        </a>
                    </div>
                    <div class="post-content">
                        <h4 class="post-title">
                            <a href="@Model.SourceLink" target="_blank">@Model.Title</a>
                          
                        </h4>
                        <div class="post-meta">
                            <span class="date">
                                <i class="icon-calendar"></i> @Model.PublishDate
                            </span>
                            <span class="comments">
                                <i class="icon-comments"></i> <a href="#">@UtilityService.GetCommentCount(Model.FeedPostId) comments</a>
                            </span>
                            <span class="tags">
                                <a href="@UtilityService.GettwitterShareLink(Model.FeedPostId)" class="custom-soc icon-text">&#62217;</a>
                                <a href="@UtilityService.GetFacebookShareLink(Model.FeedPostId)" class="custom-soc icon-text">&#62220;</a>
                            </span>
                            <span class="author">
                                <i class="icon-user"></i> <a href="#">eakroko</a>
                            </span>
                        </div>
                        <div class="post-text">
                            <p>@Html.Raw(Model.FullDescription)</p>
                           </div>
                    </div>
                    <div class="post-comments">
                        <h3>Comments</h3>
                        @Html.Action("GetFeedComments", "Home", new { feedid = Model.FeedPostId })
                    
                    </div>
                </div>
                <a href="@Model.SourceLink" target="_blank"> <h1>@Model.Title</h1></a>
                <div class="author">
        
                </div>
            </div>
        </div>
        <!-- BEGIN .main-page -->
        <div class="main-page left">
            <!-- BEGIN .single-block -->
            <div class="single-block">

                <!-- BEGIN .content-block -->
                <div class="content-block main left">

                    <div class="block">
                        <div class="block-content">

                            <div class="shortcode-content">
                                <div class="paragraph-row">
                                
                                    <div class="column3">
                                        @*<h3 class="highlight-title">Story Highlights</h3>
                                            <ul>
                                                <li>Ex facer detraxit conseqtur sea, graece graeci sit no cum quodsi omnium.</li>
                                                <li>Pro an docendi quaestio. vel adhuc lorem habemus, epicuri explicari dignissim.</li>
                                                <li>Id sententiae eloquentiam. Mei eius lorem ei, stet nostr signiferumque mel.</li>
                                            </ul>*@
                                        @Html.Action("RelatedFeed", "Home", new { categoryId = Model.CategoryId, feedpostId = Model.FeedPostId })
                                    </div>
                                    <div class="column9">
                                        <p> <img src="@configUrl" alt="" /></p>
                                        <p>@Html.Raw(Model.FullDescription)</p>
                                    </div>
                                </div>
                                <div class="article-title">
                                    <div class="share-block right">
                                        <div>
                                            <div class="share-article left">
                                                <span>Social media</span>
                                                <strong>Share this article</strong>
                                            </div>
                                            <div class="left">
                                                <a class="custom-soc icon-text" href="@UtilityService.GetFacebookShareLink(Model.FeedPostId)"></a>

                                                <a class="custom-soc icon-text" href="@UtilityService.GettwitterShareLink(Model.FeedPostId)"></a>
                                            </div>
                                            <div class="clear-float"></div>
                                        </div>
                                        <div>
                                            <a href="#" class="small-button"><span class="icon-text">&#59158;</span>&nbsp;&nbsp;Print this article</a>
                                            <a href="#" class="small-button"><span class="icon-text">&#9993;</span>&nbsp;&nbsp;Send e-mail</a>
                                        </div>
                                    </div>
                                    <div class="author">
                                        <span class="hover-effect left"><img src="/images/photos/avatar-2.jpg" alt="" /></span>
                                        <div class="a-content">
                                        
                                        </div>
                                    </div>
                                    <div class="article-tags tag-cloud">

                                        <strong>TAGS:</strong><a href="#">@UtilityService.GetTagbyCategory(Model.CategoryId)</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="block-title">
                            <a href="#writecomment" class="right">Write a comment</a>
                            <h2>@UtilityService.GetCommentCount(Model.FeedPostId) Comments</h2>
                        </div>
                        <div class="block-content">
                            <div class="comment-block">

                                <ol class="comments">
                                    @Html.Action("GetFeedComments", "Home", new { feedid = Model.FeedPostId })
                                </ol>
                            </div>
                        </div>
                        <div class="block-title">
                            <a href="#writecomment" class="right">View all comments</a>
                            <h2>Write a comment</h2>
                        </div>
                        <div class="block-content">
                            <div id="writecomment">
                         @Html.Action("WriteComment", "Home", new { feedId = Model.FeedPostId })

                            </div>
                        </div>

                    </div>
                    </div>
            </div>
        </div>
        <div class="span3">
            <div class="blog-widget">
                @Html.Action("RelatedFeed", "Home", new { categoryId = Model.CategoryId, feedpostId = Model.FeedPostId })
             </div>
          
      
            
        </div>
    </div>
</div>




<script type="text/javascript">
    function popup_share(url, width, height) {
        day = new Date();
        id = day.getTime();
        eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=0,width=" + width + ", height=" + height + ", left = 363, top = 144');");
    }

    $(document).ready(function() {
        clearJumpTags();
    });

    function clearJumpTags() {
        var list = document.querySelectorAll(".jumpTag");
        var virallist = document.querySelectorAll(".mf-viral");
        var anchortaglist = document.querySelectorAll(".feeddescription a");
        var breaktaglist = document.querySelectorAll(".feeddescription br");
        var imgtaglist = document.querySelectorAll(".feeddescription img");
        $.each(breaktaglist, function () {
            $(this).remove();
        });

        $.each(imgtaglist, function () {
            $(this).remove();
        });

        $.each(virallist, function () {
            $(this).remove();
        });

        $.each(anchortaglist, function () {
            $(this).remove();
        });
        $.each(list, function () {
            $(this).remove();
        });
        $.unblockUI();

        $(".HomeButton").closest("li").addClass("active");

    };
    
</script>